<?php

/**
 * main actions.
 *
 * @package    cpfaizenay
 * @subpackage main
 * @author     Manu
 * @version    1.0
 */
class mainActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
      if (!$request->getParameter('sf_culture'))
      {
        if ($this->getUser()->isFirstRequest())
        {
          $culture = $request->getPreferredCulture(array('fr'));
          $this->getUser()->setCulture($culture);
          $this->getUser()->isFirstRequest(false);
        }
        else
        {
          $culture = $this->getUser()->getCulture();
        }

//        $this->redirect('localized_homepage');
      }
//      $this->kindNews = $request->getParameter('kindNews');
//
//      $response = $this->getResponse();
//      switch($this->kindNews){
//        case "adult":
//            $kind_title = "Actualités adultes ";
//            break;
//        case "young":
//            $kind_title = "Actualités jeunes ";
//            break;
//        default:
//            $kind_title = "";
//            break;
//      }
//      if(!empty($kind_title)){
//          isicsBreadcrumbs::getInstance()->addItem($kind_title, '#');
//          Utils::setSlogTitle($kind_title, $response);
//      }
  }
}
